package com.sm.auth.controller;

import com.sm.auth.entity.UmsMenu;
import com.sm.auth.service.MenuService;
import com.sm.common.response.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("sys/menu")
@Slf4j
public class MenuController {
    @Autowired
    private MenuService menuService;
    @RequestMapping("self")
    public Result searchSelfMenu() {
        List<UmsMenu> umsMenuList = menuService.searchSelfMenu();
        log.info("umsMenuList: {}", umsMenuList);
        return Result.success(umsMenuList);
    }
}
